<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!-- 引入样式 -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <!-- 引入组件库 -->
    <link rel="stylesheet" href="./style/index.css">
    <script src="./echarts/echarts.common.min.js"></script>
</head>
<body>

<el-container style="height: 100%;" id="app">
    <el-aside width="200px" style="background-color: rgb(0,21,41)">
        <div style="height: 60px;text-align: center;background-color: rgb(0,33,64)">
            <div style="display: inline-block;width: 60px;text-align: center">
                <img src="./image/default.jpg" style="width: 32px;">
            </div>
            <div style="display: inline-block;width: 130px;text-align: left">
                <h1 style="color: white">Bai Cai</h1>
            </div>
        </div>
        <el-menu :default-openeds="['1']" default-active="1" background-color="#001529"
                 text-color="#eeeeee" active-text-color="#409EFF" unique-opened="true">
            <el-submenu index="1">
                <template slot="title"><i class="el-icon-message"></i>dashboard</template>
                <el-menu-item index="1-1">工作台</el-menu-item>
                <el-menu-item index="1-2">周报</el-menu-item>
            </el-submenu>
            <el-submenu index="2">
                <template slot="title"><i class="el-icon-menu"></i>应用</template>
                <el-menu-item index="2-1">应用管理</el-menu-item>
                <el-menu-item index="2-2">代码质量</el-menu-item>
            </el-submenu>
            <el-submenu index="3">
                <template slot="title"><i class="el-icon-setting"></i>模板</template>
                <el-menu-item index="3-1">项目排期</el-menu-item>
            </el-submenu>
            <el-submenu index="4">
                <template slot="title"><i class="el-icon-setting"></i>关于</template>
                <el-menu-item index="3-1">关于我们</el-menu-item>
            </el-submenu>
        </el-menu>
    </el-aside>

    <el-container>
        <el-header class="index-el-header">
            <img src="./image/tip.png" style="width: 16px">
            <el-badge is-dot class="item">

            </el-badge>

            <img src="./image/default.jpg" style="width: 24px;margin-left: 30px">
            <span style="font-size: 18px;margin-left: 10px">王小虎</span>
        </el-header>
        <el-header style="height: 120px">
            <div style="background-color: white;height: 140px;margin-top: 10px">
                <el-breadcrumb separator="/">
                    <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
                    <el-breadcrumb-item>应用管理</el-breadcrumb-item>
                </el-breadcrumb>
                <div style="height: 70px;width: 100%;margin-top: 30px">
                    <h3>应用列表</h3>
                    <span>XXXXXXXXXXXXXXXX</span>
                </div>
            </div>
        </el-header>
        <el-main class="index-el-main">
            <el-card class="box-card">
                <div slot="header" class="clearfix">
                    <el-button-group>
                        <el-button autofocus="true" @click="selectItem('only_me')">只看自己</el-button>
                        <el-button @click="selectItem('all')">全部</el-button>
                    </el-button-group>

                    <el-button style="float: right; padding: 3px 0" type="text">维护两个项目</el-button>
                </div>

                <el-table
                        :data="tableData"
                        style="width: 100%">
                    <el-table-column
                            prop="app"
                            label="应用"
                            width="180">
                    </el-table-column>
                    <el-table-column
                            prop="swagger"
                            label="swagger地址"
                            width="180">
                    </el-table-column>
                    <el-table-column
                            prop="gitlab"
                            label="仓库HTTP地址">
                    </el-table-column>
                    <el-table-column
                            prop="owners"
                            label="拥有人">
                        <template slot-scope="scope" >
                            <img v-for="image in scope.row.owners" :src="image" style="width: 20px;border-radius: 50%">
                        </template>
                    </el-table-column>
                    <el-table-column
                            prop="options"
                            label="操作">
                        <template slot-scope="scope">
                            <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
                            <el-button type="text" size="small">编辑</el-button>
                            <el-button type="text" size="small">删除</el-button>
                        </template>
                    </el-table-column>
                </el-table>
            </el-card>
        </el-main>

    </el-container>
</el-container>


<script src="./vue/vue.js"></script>
<script src="https://unpkg.com/element-ui/lib/index.js"></script>

<script>
    new Vue({
        el: '#app',
        mounted:function(){
            this.tableData = this.tableData_onlyme
        },
        data: {
            selectedItem: 'only_me',
            tableData:[],
            tableData_onlyme: [{
                app: '2016-05-02',
                swagger: '王小虎',
                gitlab: '上海市普陀区金沙江路 1518 弄',
                owners:[
                    './image/default.jpg',
                    './image/tx/czm.jpg',
                    './image/tx/hb.jpg'
                ],

            }, {
                app: '2016-05-02',
                swagger: '王小虎',
                gitlab: '上海市普陀区金沙江路 1518 弄',
                owners:[
                    './image/default.jpg'
                ],
            }, {
                app: '2016-05-02',
                swagger: '王小虎',
                gitlab: '上海市普陀区金沙江路 1518 弄',
                owners:[
                    './image/default.jpg',
                    './image/tx/czm.jpg',
                    './image/tx/hb.jpg',
                    './image/default.jpg',
                    './image/tx/czm.jpg',
                    './image/tx/hb.jpg',
                ],
            }, {
                app: '2016-05-02',
                swagger: '王小虎',
                gitlab: '上海市普陀区金沙江路 1518 弄',
                owners:[
                    './image/default.jpg',
                    './image/tx/czm.jpg',
                    './image/tx/hb.jpg'
                ],
            }],

            tableData_all: [{
                app: '2016-05-02',
                swagger: '王小虎',
                gitlab: '上海市普陀区金沙江路 1518 弄',
                owners:[
                    './image/default.jpg',
                    './image/tx/czm.jpg',
                    './image/tx/hb.jpg'
                ],

            }, {
                app: '2016-05-02',
                swagger: '王小虎',
                gitlab: '上海市普陀区金沙江路 1518 弄',
                owners:[
                    './image/default.jpg'
                ],
            }, {
                app: '2016-05-02',
                swagger: '王小虎',
                gitlab: '上海市普陀区金沙江路 1518 弄',
                owners:[
                    './image/default.jpg',
                    './image/tx/czm.jpg',
                    './image/tx/hb.jpg',
                    './image/default.jpg',
                    './image/tx/czm.jpg',
                    './image/tx/hb.jpg',
                ],
            }, {
                app: '2016-05-02',
                swagger: '王小虎',
                gitlab: '上海市普陀区金沙江路 1518 弄',
                owners:[
                    './image/default.jpg',
                    './image/tx/czm.jpg',
                    './image/tx/hb.jpg'
                ],
            },{
                app: '2016-05-02',
                swagger: '王小虎',
                gitlab: '上海市普陀区金沙江路 1518 弄',
                owners:[
                    './image/default.jpg',
                    './image/tx/czm.jpg',
                    './image/tx/hb.jpg'
                ],

            }, {
                app: '2016-05-02',
                swagger: '王小虎',
                gitlab: '上海市普陀区金沙江路 1518 弄',
                owners:[
                    './image/default.jpg'
                ],
            }, {
                app: '2016-05-02',
                swagger: '王小虎',
                gitlab: '上海市普陀区金沙江路 1518 弄',
                owners:[
                    './image/default.jpg',
                    './image/tx/czm.jpg',
                    './image/tx/hb.jpg',
                    './image/default.jpg',
                    './image/tx/czm.jpg',
                    './image/tx/hb.jpg',
                ],
            }, {
                app: '2016-05-02',
                swagger: '王小虎',
                gitlab: '上海市普陀区金沙江路 1518 弄',
                owners:[
                    './image/default.jpg',
                    './image/tx/czm.jpg',
                    './image/tx/hb.jpg'
                ],
            },{
                app: '2016-05-02',
                swagger: '王小虎',
                gitlab: '上海市普陀区金沙江路 1518 弄',
                owners:[
                    './image/default.jpg',
                    './image/tx/czm.jpg',
                    './image/tx/hb.jpg'
                ],

            }, {
                app: '2016-05-02',
                swagger: '王小虎',
                gitlab: '上海市普陀区金沙江路 1518 弄',
                owners:[
                    './image/default.jpg'
                ],
            }, {
                app: '2016-05-02',
                swagger: '王小虎',
                gitlab: '上海市普陀区金沙江路 1518 弄',
                owners:[
                    './image/default.jpg',
                    './image/tx/czm.jpg',
                    './image/tx/hb.jpg',
                    './image/default.jpg',
                    './image/tx/czm.jpg',
                    './image/tx/hb.jpg',
                ],
            }, {
                app: '2016-05-02',
                swagger: '王小虎',
                gitlab: '上海市普陀区金沙江路 1518 弄',
                owners:[
                    './image/default.jpg',
                    './image/tx/czm.jpg',
                    './image/tx/hb.jpg'
                ],
            },{
                app: '2016-05-02',
                swagger: '王小虎',
                gitlab: '上海市普陀区金沙江路 1518 弄',
                owners:[
                    './image/default.jpg',
                    './image/tx/czm.jpg',
                    './image/tx/hb.jpg'
                ],

            }, {
                app: '2016-05-02',
                swagger: '王小虎',
                gitlab: '上海市普陀区金沙江路 1518 弄',
                owners:[
                    './image/default.jpg'
                ],
            }, {
                app: '2016-05-02',
                swagger: '王小虎',
                gitlab: '上海市普陀区金沙江路 1518 弄',
                owners:[
                    './image/default.jpg',
                    './image/tx/czm.jpg',
                    './image/tx/hb.jpg',
                    './image/default.jpg',
                    './image/tx/czm.jpg',
                    './image/tx/hb.jpg',
                ],
            }, {
                app: '2016-05-02',
                swagger: '王小虎',
                gitlab: '上海市普陀区金沙江路 1518 弄',
                owners:[
                    './image/default.jpg',
                    './image/tx/czm.jpg',
                    './image/tx/hb.jpg'
                ],
            }]
        },
        methods: {
            handleClick(tab, event) {
                console.log(tab, event);
            },
            selectItem:function(item){
                this.selectedItem = item
                if(item=='only_me'){
                    this.tableData = this.tableData_onlyme
                }else{
                    this.tableData = this.tableData_all
                }
            }
        },

    })
</script>
</body>
</html>